<?php 
$zebra=0;
if ($data->num_rows() > 0):
	foreach($data->result_array() as $ch):
?>
	<tr <?php if ($zebra++%2==1):?> class="zebra" <?php endif?>>
		<td><?php echo $ch['jbt_nama']?></td>
		<td><?php echo $ch['dep_nama']?></td>
		<td><?php echo date('d-m-Y', strtotime($ch['kary_jbt_tgl_menjabat']))?></td>
		<td><?php echo date('d-m-Y', strtotime($ch['kary_jbt_tgl_berhenti']))?></td>
		<td><?php
			$stop = strtotime($ch['kary_jbt_tgl_berhenti']);
			$now = time();
			echo $now < $stop? "AKTIF" : "NON AKTIF"; 
		?></td>
		<td></td>
	</tr>
<?php 
	endforeach;
else:
?><tr><td align="center" colspan="4">Tidak ada data</td></tr><?php 
endif;